package what.the.fun.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import what.the.fun.dao.ResultDAO;
import what.the.fun.domain.AnswerResult;
import what.the.fun.domain.Result;

public class ResultServiceImpl implements ResultService{

	@Autowired
	ResultDAO resultDAO;
	
	@Override
	public List<Result> getDataList() {
		return resultDAO.getDataList();
	}

	@Override
	public void insertData(Result data) {
		resultDAO.insertData(data);
	}

	@Override
	public void updateData(Result data) {
		resultDAO.updateData(data);
	}

	@Override
	public void deleteData(String id) {
		resultDAO.deleteData(id);	
	}

	@Override
	public Result getData(String id) {
		return resultDAO.getData(id);
	}

	@Override
	public List<AnswerResult> getAnswerResultListBySurveyId(String id) {
		return resultDAO.getAnswerResultListBySurveyId(id);
	}

	@Override
	public Result getLast() {
		return resultDAO.getLast();
	}

}
